﻿<Window x:Class="Demo.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:controls="clr-namespace:System.Windows.Controls;assembly=PresentationFramework"
        xmlns:themes="clr-namespace:DataGridThemes;assembly=DataGridThemes"
        xmlns:data="clr-namespace:Demo.Data"
        Height="300" Width="525"
        Title="MainWindow" >
    <Window.Resources>
        <data:IndeedList x:Key="list" />
    </Window.Resources>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="*" />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>        
        <controls:DataGrid ItemsSource="{StaticResource list}"
                          AutoGenerateColumns="True"
                          SelectionMode="Extended"
                          themes:DataGridHelper.HorizontalMouseWheelScrollingEnabled="True"
                          themes:DataGridHelper.SelectedCells="{Binding Path=myViewModelSourceList, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"                                                      
                          
                          />        
        <TextBlock Text="{Binding Path=viewModelText, Mode=OneWay}" Opacity="0.7" Grid.Row="1" />
    </Grid>
</Window>
